const http = require('http');
var options = {  
    host: 'www.ytx166.com',  
    port: '80',  
    path: '/user/login?name=13896540677&pwd=1313123'    
 }; 

 // 处理响应的回调函数  
var callback = function(response){  
    // 不断更新数据  
    var body = '';  
    response.on('data', function(data) {  
       body += data;  
    });  
      
    response.on('end', function() {  
       // 数据接收完成  
       console.log(response.headers['set-cookie']);
       console.log(body);  
    });  

    
 }  
 // 向服务端发送请求  

 var req = http.request(options, callback);  

 req.end(); 